package com.tencent.liteav.demo.play.danke;

import android.content.Context;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

/**
 * @author wpq
 * @version 1.0
 */
public class DKVideoPlayerUtils {

    private DKVideoPlayerUtils() {
    }

    public static void hideActionBar(Context context) {
        if (!(context instanceof AppCompatActivity)) {
            return;
        }
        AppCompatActivity activity = (AppCompatActivity) context;
        ActionBar ab = activity.getSupportActionBar();
        if (ab != null) {
            ab.hide();
        }
    }

    public static void showActionBar(Context context) {
        if (!(context instanceof AppCompatActivity)) {
            return;
        }
        AppCompatActivity activity = (AppCompatActivity) context;
        ActionBar ab = activity.getSupportActionBar();
        if (ab != null) {
            ab.show();
        }
    }
}
